@extends('home.layout.usermodify')

@section('content')

<head>
        <title>{{$title}}</title>
</head>
<div class="right_cont fr">
  <div class="right_cont fr balance ">
    <h5 class="center_name ui_bg2 fn">头像照片
      <span class="one"></span>
      <span class="two"></span>
      <span class="three"></span>
      <span class="four"> </span></h5>
    <div class="head_cont mt10 ui_bg2" style="height: 500px;">
    <form action="/home/usersettings/dophotos"  method="post" enctype="multipart/form-data" onsubmit="sub();">
 {{csrf_field()}}
      <div class="head_box clearfix">
        <div class="fl ml10 tc">
        <div class="h_pic pic1" id="www">
            <img id="avatar_normal" src="{{$userinfo['photo']}}" alt="" width="220" height="220" style="cursor: pointer;"></div>
        </div>
        <div class="head_txt fl w410 f12" id="rrr">
              <p>• 请上传您的头像；</p>
              <p>• 为了您的安全，
                <b>请不要上传个人隐私信息</b>到公共区域，比如
                <b>身份证</b>等；</p>
              <p>• 仅支持JPG、PNG、JPEG格式，文件小于4M；</p>
              <p>• 请勿在头像标示上留有任何联系方式的信息；</p>
              <p>• 请保证图片质量，分辨率至少为220*220；</p>
              <p>• 请不要在头像上面留电话，QQ，网址，邮箱等联系方式信息，会导致您的</p>
              <p class="t1">头像无法通过审核；</p>
          </div>
      </div>
      <!-- <input type="hidden" name="_token"  value="111"/> -->
      <div style="position: relative; height: 100px; overflow: hidden;">
        <input id="avatar-upload" name="photo" type="file" style="margin-left: 20px;">
        <input  class="ui_btn" type="submit" value="头像修改" />
      </div>
    </form>
    </div>
  </div>
</div>
<script type="text/javascript">

function sub(){
  var avg = document.getElementById("avatar-upload").value;
  if (avg=="")
  {
    alert("请选择要上传的图片");
    return false;
  }else{
    return true;
  }
}

</script>
@endsection